package com.wzdigit.wms.basic.enums.writeback;
/*
 * @Author:yangwenbiao
 * @Date 2020/7/30 5:46 PM
 * @version 1.0
 */


import com.wzdigit.wms.basic.enums.BaseEnum;

public enum OtherSystemEnum implements BaseEnum {

    /**
     * 检验单状态
     */
    SYSYTEM_WMS(101, "WMS","客户系统信息"),
    SYSYTEM_SAP(102, "SAP","客户系统信息"),
    SYSYTEM_OME(103, "OMS","客户系统信息"),
    SYSYTEM_TMS(104, "TMS","客户系统信息");


    /**
     * 枚举值
     */
    public int code;

    /**
     * 枚举名称
     */
    public String enumName;

    /**
     * 枚举实体类属性描述
     *
     * @return
     */
    public String description;

    OtherSystemEnum(int code, String enumName) {
        this.code = code;
        this.enumName = enumName;
    }

    OtherSystemEnum(int code, String enumName, String description) {
        this.code = code;
        this.enumName = enumName;
        this.description = description;
    }

    public int getCode() {
        return code;
    }

    public String getEnumName() {
        return enumName;
    }

    public String getDescription() {
        return description;
    }

    public static OtherSystemEnum getEnumByCode(int enumCode) {
        OtherSystemEnum[] values = OtherSystemEnum.values();
        OtherSystemEnum repairEnum = null;

        for (OtherSystemEnum value : values) {
            if (value.getCode() == enumCode) {
                repairEnum = value;
            }
        }
        return repairEnum;
    }

    public static OtherSystemEnum getEnumByName(String enumName) {
        OtherSystemEnum[] values = OtherSystemEnum.values();
        OtherSystemEnum repairEnum = null;

        for (OtherSystemEnum value : values) {
            if (value.getEnumName().equals(enumName)) {
                repairEnum = value;
            }
        }
        return repairEnum;
    }
}
